package com.xingzuo.library_user.ui.fragment;

import com.xingzuo.base.ui.mvp.base.adapter.BaseAdapter;
import com.xingzuo.base.ui.mvp.base.refresh.BaseRecyclerRefreshFragment;
import com.xingzuo.library_user.R;
import com.xingzuo.library_user.adapter.ConCernAdapter;
import com.xingzuo.library_user.contract.ConCernContract;
import com.xingzuo.library_user.presenter.ConCernPresenter;

import java.util.ArrayList;

public class ConCernFragment extends BaseRecyclerRefreshFragment<ConCernContract.View, ConCernPresenter> {
    private int type;

    public ConCernFragment(int type) {
        this.type = type;
    }

    @Override
    public BaseAdapter createRecyclerAdapter() {
        if (type == 0){
            return new ConCernAdapter(R.layout.item_concern,new ArrayList<>());
        }else if (type == 1){
            return new ConCernAdapter(R.layout.item_concern_miyou,new ArrayList<>());
        }else {
            return new ConCernAdapter(R.layout.item_concern_guanzhuwo,new ArrayList<>());
        }

    }

    @Override
    public ConCernPresenter getPresenter() {
        return new ConCernPresenter();
    }

    @Override
    public void initView() {
        getRefreshLayout().autoRefresh();
    }

    @Override
    public void initLinsenterner() {

    }

    @Override
    public void getData() {

    }
}
